package com.dletc.domain;

public class Users {
    private int UserID;
    private String UserName;
    private String PassWord;
    private int IsAdmin;


    public Users() {
    }

    public Users(String userName, String passWord, int isAdmin) {
        UserName = userName;
        PassWord = passWord;
        IsAdmin = isAdmin;
    }

    public Users(int userID, String userName, String passWord, int isAdmin) {
        UserID = userID;
        UserName = userName;
        PassWord = passWord;
        IsAdmin = isAdmin;
    }

    public int getUserID() {
        return UserID;
    }

    public void setUserID(int userID) {
        UserID = userID;
    }

    public String getUserName() {
        return UserName;
    }

    public void setUserName(String userName) {
        UserName = userName;
    }

    public String getPassWord() {
        return PassWord;
    }

    public void setPassWord(String passWord) {
        PassWord = passWord;
    }

    public int getIsAdmin() {
        return IsAdmin;
    }

    public void setIsAdmin(int isAdmin) {
        IsAdmin = isAdmin;
    }

    @Override
    public String toString() {
        return isNull(UserID)+ "\t" + isNull(UserName)+ "\t" + isNull(PassWord)+ "\t" + isNull(IsAdmin);
    }

    public Object isNull(Object object){
        if (object == null){
            return ""; //为空时候设定为字符串的空
        }
        return object;
    }
}
